/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "modifireinventory")
@XmlRootElement(name = "modifireinventory")
@NamedQueries({
    @NamedQuery(name = "Modifireinventory.findAll", query = "SELECT m FROM Modifireinventory m"),
    @NamedQuery(name = "Modifireinventory.findByModifireInventoryID", query = "SELECT m FROM Modifireinventory m WHERE m.modifireInventoryID = :modifireInventoryID"),
    @NamedQuery(name = "Modifireinventory.findByDescription", query = "SELECT m FROM Modifireinventory m WHERE m.description = :description")})
public class Modifireinventory implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ModifireInventoryID")
    private Long modifireInventoryID;
    @Column(name = "description")
    private String description;
    @JoinColumn(name = "modifire_ModifiremasterID", referencedColumnName = "ModifireID")
    @ManyToOne(optional = false)
    private Modifiremaster modifiremaster;
    @JoinColumn(name = "inventory_InventoryID", referencedColumnName = "IdinventoryID")
    @ManyToOne(optional = false)
    private Inventory inventory;

    public Modifireinventory() {
    }

    public Modifireinventory(Long modifireInventoryID) {
        this.modifireInventoryID = modifireInventoryID;
    }

    public Long getModifireInventoryID() {
        return modifireInventoryID;
    }

    public void setModifireInventoryID(Long modifireInventoryID) {
        this.modifireInventoryID = modifireInventoryID;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Modifiremaster getModifiremaster() {
        return modifiremaster;
    }

    public void setModifiremaster(Modifiremaster modifiremaster) {
        this.modifiremaster = modifiremaster;
    }

    public Inventory getInventory() {
        return inventory;
    }

    public void setInventory(Inventory inventory) {
        this.inventory = inventory;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (modifireInventoryID != null ? modifireInventoryID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Modifireinventory)) {
            return false;
        }
        Modifireinventory other = (Modifireinventory) object;
        if ((this.modifireInventoryID == null && other.modifireInventoryID != null) || (this.modifireInventoryID != null && !this.modifireInventoryID.equals(other.modifireInventoryID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Modifireinventory[modifireInventoryID=" + modifireInventoryID + "]";
    }

}
